home *** CD-ROM | disk | FTP | other *** search
/ Best of Shareware / Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso / mac / DOS / TELECOMM / PCCP047 / MANUAL < prev    next >
Text File  |  1992-08-28  |  9KB  |  218 lines

  1.  
  2.  
  3.           Pete Cann's Communication Package
  4.  
  5.         Portions Copyright (C) 1992 Peter Edward Cann
  6.  
  7.          (Please see the file README for legal junk)
  8.  
  9. This is a set of programs and data files for communication between a
  10. PC and something external, possibly over a modem. It is drastically
  11. different from most other communications programs, in that it is
  12. highly modular and generally requires the user to write batch files
  13. and/or scripts to make use of it. This is what you might call a
  14. "hacker style" paradigm (not to be confused with "cracker", generally
  15. an infantile individual who feels so insignificant that they screw
  16. other people in a desperate attempt to feel powerful). Hackers are
  17. people who are very comfortable with computers, and like to have a
  18. lot of control and to know what's going on. The source code for all
  19. of these programs is included in the distribution, so if you know C
  20. you have all the information I do now.
  21.  
  22. All of the programs give USAGE: information if invoked without
  23. arguments. All of the programs that use a port can use COM 1 through
  24. 8, but COM 5 and 6 are only for AT and later machines and have not
  25. been tested.
  26.  
  27. The centerpiece of the package is TERM. This is a terminal emulator.
  28. It takes an emulation file, which you create or modify with EMUED.
  29. EMUED lets you specify strings to send for any programmable key, and
  30. lets you enter strings of characters and substitution tokens to
  31. invoke functions. These would be the "escape sequences", although
  32. they need not begin with Escape. The token codes are in EMU.H. The
  33. emulation facility also provides a graphics character substitution
  34. table for graphics character commands. TERM and EMUED look in the
  35. directory named by the PCCPPATH environment variable for emulation
  36. files, if PCCPPATH is set. The program CCODES types a hex listing of
  37. display character codes for use when assigning graphics characters in
  38. EMUED.
  39.  
  40. TERM generates a CRLF in response to a Linefeed character, so it is
  41. often desirable to program an emulation to do a DOWN in response to a
  42. Linefeed. For LF insertion, the function CRLF can be performed in
  43. response to a CR. If the emulation file basename is prefixed with a
  44. plus sign (+), local echo is activated.
  45.  
  46. The program TERMPLAY will step a file through an emulation.
  47.  
  48. The program MASTERM invokes term with the three or four arguments,
  49. but if you exit TERM you get a menu for file transfers or beginning a
  50. dribble file. The file transfer programs are three variations on
  51. XMODEM in each direction, and have fairly clear names.
  52.  
  53. The program SESSION is a simple host program, for use AFTER password
  54. validation by the script facility. It is hard-coded for 8n1 bits. It
  55. expects the modem to be in AT&C1 mode, that is, Carrier Detect
  56. conveys information. The last (optional) two arguments to SESSION are
  57. directories for download and upload. If they are given, they are
  58. prepended to the entered pathname in file transfer operations. If a
  59. directory is given, dot-dot (..) is prohibited in pathnames and the
  60. Shell option is not available.
  61.  
  62. The environment of any subschell contains REMOTE=YES, so you can do
  63.  
  64.     IF NOT "%REMOTE%"=="YES" THING
  65.  
  66. in a batch file, where THING is something that would be bad to do
  67. from a comport, such as run a display editor. SESSION terminates if
  68. Carrier Detect goes false, unless it is running the shell.
  69.  
  70. The program MESSIN accepts a message from the port and appends it to
  71. the specified file. This is for email to the sysop. The program
  72. MESSOUT asks for a filename in the specified directory and displays
  73. it with pagination. Security is achieved through sparse naming.
  74.  
  75. The program COMSCRPT runs scripts. It is very powerful, with multiple
  76. branching look-fors, timeouts and retry limits.
  77.  
  78. The script file must have the extension ".SCR". If the PCCPPATH
  79. environment variable is set, the program looks for the script there.
  80. The program loads the script into RAM and then executes it. Lines are
  81. limited to 80 characters. The number of lines is limited to 512.
  82.  
  83. The characters '|' and '~' are special. '|' means CR in < lines and >
  84. lines (LF is stripped for > processing); and newline in ! lines. '~'
  85. means 0.4 second delay in < lines and bell in ! lines. (In > lines it
  86. means itself.) Also, in < and > lines, `xx (backquote followed by two
  87. hex digits) expands to the specified character code. Letters in the
  88. hex number may be either case. There is no validity checking. Also in
  89. < lines, ^ means break. To send a magic character, use its hex code
  90. with a backquote.
  91.  
  92. The first line of the script file is the first three arguments as for
  93. TERM, space-delimited. In subsequent lines, the first character of
  94. each line is the command; the rest of the line (after the delimiting
  95. space) is argument(s). A final string argument may include spaces,
  96. and begins after the delimiting space. Blank lines are ignored.
  97.  
  98. The command characters are as follows:
  99.  
  100. ;
  101.     {introduces comment; line ignored; space not required}
  102.  
  103. : <decimal number 0-255>
  104.     {label for conditional or unconditional goto} 
  105.  
  106. g <label #>
  107.     {goto label #}
  108.  
  109. * <label #>
  110.     {establishes a demon to goto label upon Control-X from keyboard}
  111.     {* -1 cancels}
  112.  
  113. r <label #> <retries> <register>
  114.     {increments specified retry register}
  115.     {zeros register and goes to label if register > retries}
  116.     {register is 0 - 255}
  117.  
  118. 0 <retry register>
  119.     {zeros the specified retry register}
  120.  
  121. p <seconds>
  122.     {processes pending look-fors; falls through upon timeout}
  123.     {clears pending look-for list upon completion}
  124.     {zero seconds indicates no timeout}
  125.  
  126. > <label #> <string>
  127.     {look for string upon p command; if hit goto label}
  128.     {incoming linefeeds ignored}
  129.     {first come, first served}
  130.     {maximum of 32 active > demons allowed}
  131.  
  132. ? <label #>
  133.     {goto label if Clear To Send or Tx Hold Reg Empty is false}
  134.  
  135. d <label #>
  136.     {goto label if Carrier Detect is true}
  137.  
  138. < <string>
  139.     {send string to port}
  140.  
  141. ! <string>
  142.     {send string to console}
  143.  
  144. x <label #> <command line string>
  145.     {run executable file with arguments and wait for termination}
  146.     {goto label # if non-zero exit code}
  147.  
  148. s <label #> <command line string>
  149.     {run system command line and wait for termination}
  150.     {goto label # if error in running command.com}
  151.     {will not report errors within command string}
  152.  
  153. +
  154.     {Raise DTR handshake line}
  155.  
  156. -
  157.     {Drop DTR handshake line}
  158.  
  159. k <label> <character>
  160.     {set branch to label upon keyboard character received in w function}
  161.     {limit 64 simultaneous characters pending}
  162.  
  163. w <seconds>
  164.     {wait seconds for keyboard character, performing k dispatching}
  165.     {fall through if no character in <seconds> seconds}
  166.     {zero seconds indicates no timeout}
  167.     {clears all k commands pending upon any termination}
  168.  
  169. c
  170.     {clears pending lookfors and keys (> and k)}
  171.  
  172. q <exit code>
  173.     {quit with exit code}
  174.     {codes other than zero under 128 are reserved to internals}
  175.  
  176. When scripting modem commands, which is how you're intended to
  177. configure and dial the modem, try a ~ before and after the at, for
  178. instance:
  179.  
  180.     < ~at~&f&c1&d2|
  181.  
  182. The program SCRCHK types a listing of the argument script file giving
  183. statement numbers, which are not the same as line numbers. It leaves
  184. out blank lines for some reason. It also detects some errors,
  185. including potential branching to undefined labels. It prints out a
  186. table of label numbers with their corresponding line numbers.
  187.  
  188. During execution of a script, Control-C will cancel and Control-X can
  189. redirect the script on an interrupt basis.
  190.  
  191. All of the I/O programs except TERM pay attention to CTS. None of
  192. them do XON/XOFF. The computer is assumed to be fast enough to keep
  193. up. However, since DOS video is very slow, TERM will suspend display
  194. if a buffer overrun threatens.
  195.  
  196.  
  197. FAX PROGRAMS
  198.  
  199. RCVFAX receives a fax from a Class 2 modem. It is intended to be
  200. called immediately after the "FAX" response. See HOSTDEMO.SCR for how
  201. to configure the faxmodem. RCVFAX uses the first speed until it sees
  202. the "+FCON" message, then switches to the second speed, which will
  203. generally be 19200 with Rockwell-based modems. It stimulates page
  204. transmits, and stores the session in the specified directory in a
  205. file of which the name is the universal time as an 8-digit hex number
  206. with the extension .RFX.
  207.  
  208. Since the filenames are awkward, FAXMANIP, when run in the fax
  209. directory, displays RFX files as dates and times, and allows you to
  210. convert or delete. A secret FAXMANIP function is E, which will run a
  211. system call on the first argument, space, filename. This is intended
  212. for editing, by the adventurous. Also, when an argument is given to
  213. FAXMANIP, debugging output is turned on in RFXTOPCX.
  214.  
  215. RFXTOPCX converts an RFX file to a series of PCX files, prompting for
  216. the name of each page file and reporting status. A second argument
  217. turns on debugging output.
  218.